using System;
using System.Collections;
using dnAnalytics.Math;

namespace CalcSharp.Core.Containers
{
    /// <summary>
    /// Memory Manager Interface
    /// </summary>
    /// <typeparam name="PackedType">The type the memory manager works with</typeparam>
    /// <typeparam name="ReturnType">The type that the memory manager returns</typeparam>
    public interface IMemMan<PackedType, ReturnType>
    {
        int Count { get; }
        void Clear();
        bool isset(string name);
        void unset(string name);
        int Add(PackedType item);
        PackedType PackSingle(string name);
        string[] keys { get; }
        ReturnType this[string s] { get; set; }
    }

    #region result class
    /// <summary>
    /// Result Class
    /// </summary>
    public class Tresult
    {
        public double floatingpt;
        public AMatrix matrixtype;
        public Complex complex;
        public ASet settype;
        public string stringtype;
        public Tresult()
        {
            this.floatingpt = double.NaN;
            this.complex = Complex.NaN;
            this.settype = null;
            this.stringtype = null;
        }
    }
    #endregion
}